home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / QuickTime / QT Tools / QuickTime Interfacing.sit / QuickTime Interfacing / SeeMovieRun folder / sources / CEBSwitchboard.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-20  |  1.8 KB  |  64 lines  |  [TEXT/KAHL]

  1. /******************************************************************************
  2.  CEBSwitchboard.c
  3.  
  4.                             The Event Broadcasting Switchboard Class
  5.         
  6.         Event Broadcasting switchboard, uses a single global instance of a
  7.         CEBCollaborator broadcast events to any object that needs it.
  8.     
  9.     SUPERCLASS = CSwitchboard
  10.     
  11.     Copyright © 1992 Joe Zobkiw. All rights reserved.
  12.     Portions Copyright © 1990 Symantec Corporation.  All rights reserved.
  13.         
  14.  ******************************************************************************/
  15.  
  16. #include "CEBSwitchboard.h"
  17. #include "CEBCollaborator.h"
  18. #include "CSwitchboard.h"
  19. #include "CDesktop.h"
  20.  
  21. /*** Global Variables ***/
  22.     
  23. extern CDesktop            *gDesktop;            /* The visible Desktop */
  24. extern CEBCollaborator    *gEBCollaborator;    /* event broadcaster */
  25.  
  26. /******************************************************************************
  27.  IEBSwitchboard
  28.  
  29.         Initialize an EBSwitchboard object.
  30.  ******************************************************************************/
  31.  
  32. void    CEBSwitchboard::IEBSwitchboard()
  33. {
  34.     CSwitchboard::ISwitchboard();
  35. }    
  36.  
  37.  
  38. /******************************************************************************
  39.  DispatchEvent
  40.  
  41.         Handle broadcasting all events except null events
  42.  
  43.  ******************************************************************************/
  44.  
  45. void    CEBSwitchboard::DispatchEvent(EventRecord *macEvent)
  46. {
  47.     gEBCollaborator->BroadcastEvent(macEvent);
  48.     inherited::DispatchEvent(macEvent);
  49. }
  50.  
  51.  
  52. /******************************************************************************
  53.  DoIdle
  54.  
  55.         Handle broadcasting null events here because they do not get routed 
  56.         through DispatchEvent.
  57.  
  58.  ******************************************************************************/
  59.  
  60. void    CEBSwitchboard::DoIdle(EventRecord *macEvent)    /* Usually a null or system event    */
  61. {
  62.     gEBCollaborator->BroadcastEvent(macEvent);
  63.     inherited::DoIdle(macEvent);
  64. }